import request from '@/utils/request';
// import { AxiosPromise } from 'axios';
// import { StoreQuery, StoreVO } from '@/api/operates/shopkeeper/types';

/**
 * 店铺列表
 * @param query 
 * @returns 
 */
export const listPage = (query:any) => {
  return request({
    url: '/store/list',
    method: 'get',
    params: query
  });
};

// 新增
export const add = (query:any) => {
  return request({
    url: `/store/add`,
    method: 'post',
    data: query
  });
};

// 编辑
export const edit = (query:any) => {
  return request({
    url: `/store/edit`,
    method: 'post',
    data: query
  });
};

// 启用禁用
export const changeStatusApi = (query:any) => {
  return request({
    url: `/store/enable/${query.id}`,
    method: 'post',
  });
};

// 删除
export const del = (query:any) => {
  return request({
    url: `/store/remove/${query.id}`,
    method: 'post',
  });
};